/* sessionStorage存储常量key */
/** 注意：sessionStorage中存储的value为数组[]时，浏览器内部实现会将value数组[]转换成String格式数据，
     相同于实际存储的是json数据
*/
function  DataStorage(){ }

DataStorage.prototype = {
		get:function(key){
			return sessionStorage[key];
		},
		set:function(key,value){
			sessionStorage[key] = value;
		},
		remove:function(key){
			sessionStorage.removeItem(key);
		},
		reset:function(){
			sessionStorage[OtherThing.isManaged] = false;
		}
}

// 存储自己信息
var MyOwner = function () { };

MyOwner.playerId = "MyOwner.playerId"; 
MyOwner.sit = "MyOwner.sit";
MyOwner.userId = "MyOwner.userId";
MyOwner.deskId = "MyOwner.deskId";
MyOwner.roomId = "MyOwner.roomId";
MyOwner.isLandlord = "MyOwner.isLandlord";
MyOwner.bombNums = "MyOwner.bombNums";
MyOwner.roleName = "MyOwner.roleName";
MyOwner.multiple = "MyOwner.multiple";
MyOwner.rolePeopleHead = "MyOwner.rolePeopleHead";

// 存储同桌其他玩家信息
var LeftPlayer = function () { };

LeftPlayer.playerId	= "LeftPlayer.playerId"; 
LeftPlayer.sit = "LeftPlayer.sit";
LeftPlayer.cardNumber = "LeftPlayer.cardNumber";
LeftPlayer.isLandlord = "LeftPlayer.isLandlord";
LeftPlayer.bombNums = "LeftPlayer.bombNums";
LeftPlayer.roleName = "LeftPlayer.roleName";
LeftPlayer.multiple = "LeftPlayer.multiple";
LeftPlayer.rolePeopleHead = "LeftPlayer.rolePeopleHead";
//存储同桌其他玩家信息
var RightPlayer = function () { };

RightPlayer.playerId	= "RightPlayer.playerId"; 
RightPlayer.sit = "RightPlayer.sit";
RightPlayer.cardNumber = "RightPlayer.cardNumber";
RightPlayer.isLandlord = "RightPlayer.isLandlord";
RightPlayer.bombNums = "RightPlayer.bombNums";
RightPlayer.roleName = "RightPlayer.roleName";
RightPlayer.multiple = "RightPlayer.multiple";
RightPlayer.rolePeopleHead = "RightPlayer.rolePeopleHead";

var OtherThing = function () {};

OtherThing.bottomCards = "OtherThing.bottomCards"; // 底牌
OtherThing.perOutCards = "OtherThing.perOutCards";
OtherThing.landlordPlayerId = "OtherThing.landlordPlayerId";

OtherThing.isManaged = "OtherThing.isManaged";
OtherThing.isGameOnGoing = "OtherThing.isGameOnGoing";
OtherThing.timeOutStartTimeStamp = "OtherThing.timeOutStartTimeStamp";
OtherThing.isOnChangingDesk = "OtherThing.isOnChangingDesk"; // 换桌标志位
OtherThing.reConnectCount = "OtherThing.reConnectCount"; // 断续重连连续次数
//比赛类型
OtherThing.gameModeType = "OtherThing.gameModeType";
//总炸弹数
OtherThing.bombNums = "OtherThing.bombNums";
//是否开启BOSS房间
OtherThing.baseScore = "OtherThing.baseScore";
